package org.bill.entity;

import org.bill.util.GeneralUtil;

/**
 * 用户类
 * 
 * @author 米mi
 *
 */
public class User {

    /**
     * 用户编号
     */
    private int userId;

    /**
     * 用户名（昵称）
     */
    private String nickName;

    /**
     * 密码
     */
    private String password;

    /**
     * 真实姓名
     */
    private String realName;

    /**
     * 性别
     */
    private String sex;

    /**
     * 年龄
     */
    private int age;

    /**
     * 电话
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 省份证号
     */
    private String ID;

    /**
     * 家庭住址
     */
    private String address;

    /**
     * 账单总额
     */
    private double total;

    /**
     * 最后登录时间
     */
    private long lastOnLine;

    /**
     * 状态（0-未激活，1-禁用，2-冻结，3-正常）
     */
    private int state;

    /**
     * 是否认证
     * 
     * @return
     */
    public boolean isCertify() {
        return !realName.equals(GeneralUtil.DEFAULT_STR) // 真实姓名为空
                || !ID.equals(GeneralUtil.DEFAULT_STR); // 身份证号为空
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getID() {
        return ID;
    }

    public void setID(String iD) {
        ID = iD;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public double getTotal() {
        return total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public long getLastOnLine() {
        return lastOnLine;
    }

    public void setLastOnLine(long lastOnLine) {
        this.lastOnLine = lastOnLine;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

}
